Local irradiance estimation for use in rendering an image

ABSTRACT

Relightable free-viewpoint rendering allows a novel view of a scene to be rendered and relit based on multiple views of the scene from multiple camera viewpoints. Cast shadows in the scene are handled to allow local occlusion to be taken into account when determining irradiance estimates for the sample positions in the scene. This is achieved by determining an initial estimate of irradiance by ignoring local occlusion, then using that initial irradiance estimate with knowledge of the scene geometry to determine an angle-dependent radiance estimate for the scene. This radiance estimate can then be used with the knowledge of the scene geometry to determine local irradiance estimates at the sample positions within the scene.

BACKGROUND

An image of a scene can be captured from the viewpoint of a camera. In some cases there may be more than one camera capturing different images of a scene. Each image of the scene represents a view of the scene from the viewpoint of the respective camera. However, there will be some viewpoints of the scene which do not correspond to any of the camera viewpoints. The image may be a frame of a video sequence. Techniques such as Free-Viewpoint Video Rendering (FVVR) allow an image representing a novel view of a scene to be generated based on a set of multiple views of the scene from multiple camera viewpoints. The cameras are preferably calibrated and synchronized with each other to facilitate inferring intermediate images of the scene.

Based on the different images of the scene, a model of the scene geometry may be constructed, for example using Multiple-View Stereo (MVS), and a texture may be formed which can be applied to the model. The texture can be formed by projectively texturing the scene geometry with the original images and blending the projected images. The model, with the texture, can then be used to render the scene from a rendering viewpoint which may, or may not, be the same as one of the camera viewpoints. As well as recreating a “real-world” scene from a rendering viewpoint, the content of the real-world scene may be rendered alongside other scene content, either computer generated or real-world.

The term “geometry” is used in the art, and herein, to refer to computer-generated representations of the surfaces of objects in the scene, such that the geometry allows the shape, size and location of objects in the scene to be modelled. The geometry can be textured to thereby apply textures (e.g. defining a colour and other surface detail) to the geometry in order to represent the appearance of objects in the scene. Geometry reconstructed from multiple images of a real scene may be referred to as a “proxy” or “geometric proxy” herein. The geometry is often a triangle mesh, although other representations such as point clouds are possible.

There are a number of issues which may need to be considered when generating a novel viewpoint of a scene, particularly when integrating content into surroundings that differ to those at capture. For example, relighting of the scene can be difficult. Textures extracted from images (e.g. frames of a video sequence) captured by cameras have implicit real-world lighting information, such that lighting artefacts are present (i.e. “baked-in”) in the textures.

One way of addressing the problem of how to relight the textures for a novel viewpoint is to control the lighting of the scene at the time when the cameras capture the different views of the scene. For example, diffuse lighting can be used in the initial video capture to avoid creating excess shaded areas and specularities that will damage the plausibility of the scenes rendered using extracted textures. The effects of changes in lighting may be reproduced by estimating the material properties of the textures, for example the intrinsic colour (albedo) and fine detail (surface normals), for subsequent relighting using conventional computer graphics techniques. This may be addressed using an active lighting (or “light-stage”) arrangement, in which images of the scene are captured under a variety of calibrated lighting conditions, with material properties of the textures (such as the intrinsic colour, or “albedo”, and the fine detail of the surfaces) being fitted to the images. However, the method requires costly apparatus and is generally limited to static scenes. Relighting scenes with arbitrary lighting arrangements is considerably more challenging.

SUMMARY

This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

There is provided a method of determining local irradiance estimates for a scene in an image processing system, the method comprising: obtaining initial irradiance estimates for sample positions on one or more surfaces in the scene, the initial irradiance estimates being based on a global irradiance estimate for the scene; obtaining visibility indications which indicate the visibility of the sample positions in the scene in dependence on viewing angle; calculating an angle-dependent radiance estimate for the scene using the obtained initial irradiance estimates and the obtained visibility indications; and determining local irradiance estimates at the sample positions using the radiance estimate and the visibility indications.

The method may further comprise using the local irradiance estimates to determine an intrinsic colour estimate for a texture.

The global irradiance estimate may be dependent upon surface normal, and said obtaining initial irradiance estimates for sample positions on one or more surfaces in the scene may comprise determining the initial irradiance estimates by sampling the global irradiance estimate using surface normals of the sample positions.

The global irradiance estimate for the scene may be determined by: analysing at least one view of the scene to estimate scene geometry describing the one or more surfaces in the scene and to segment an initial texture into a plurality of materials, the initial texture being separable into an intrinsic colour estimate and a corresponding shading estimate; determining an initial coarse intrinsic colour estimate for each of the materials; determining one or more scale factors, for scaling a respective one or more of the initial coarse intrinsic colour estimates, the scale factors being determined based on differences between material irradiance estimates determined for the materials based on shading estimates which correspond with scaled versions of the initial coarse intrinsic colour estimates of the materials; and determining the global irradiance estimate as a function of surface normal using the determined scale factors. It may be the case that, for each of the materials, the initial coarse intrinsic colour estimate is determined by finding the average of the values in the initial texture for the material. Furthermore, said determining the global irradiance estimate using the determined scale factors may comprise: scaling the one or more of the initial coarse intrinsic colour estimates using the determined scale factors; and using the scaled coarse intrinsic colour estimates to determine the global irradiance estimate as a function of surface normal. Said using the scaled coarse intrinsic colour estimates to determine the global irradiance estimate may comprise: combining the scaled coarse intrinsic colour estimates to form a global coarse intrinsic colour estimate; and using the global coarse intrinsic colour estimate to determine the global irradiance estimate as a function of surface normal. Furthermore, the method may further comprise fitting second order spherical harmonics to the global irradiance estimate to thereby denoise the global irradiance estimate. The step of determining one or more scale factors may comprise: determining a measure of the differences between material irradiance estimates for different materials in overlapping regions of the material irradiance estimates, said measure of the differences being dependent upon the scale factors, wherein for a particular scale factor the material irradiance estimate for a material matches the shading estimate which corresponds with a version of the initial coarse intrinsic colour estimate scaled with the particular scale factor; and determining the scale factors so as to minimise the measure of the differences.

The step of obtaining visibility indications may comprise determining the visibility indications based on estimated scene geometry describing the one or more surfaces in the scene determined by analysing at least one view of the scene.

The visibility indications may be in the form of spherical harmonic coefficients, b_(x,k), for sample position x and for the k^(th) order spherical harmonics up to the K^(th) order spherical harmonics.

The step of calculating an angle dependent radiance estimate for the scene may comprise determining spherical harmonic coefficients r_(k) for the k^(th) order spherical harmonics up to the K^(th) order spherical harmonics, wherein the radiance estimate may be calculated in accordance with the equation:

R*=(B ^(T) B)⁻¹ B ^(T) I _(E),

where R* is a vector of the spherical harmonic coefficients r_(k) for the radiance estimate, B is a matrix of the spherical harmonic coefficients b_(x,k) for the visibility indications and I_(E) is a vector of the obtained initial irradiance estimates for the sample positions, x.

The local irradiance estimate I(x) at sample position x may be determined in accordance with the equation:

I(x)=Σ_(k=1) ^(K) b _(x,k) r _(k)

where b_(x,k) is the k^(th) order spherical harmonic coefficient for the visibility indications at sample position x, and where r_(k) is the k^(th) order spherical harmonic coefficient for the radiance estimate.

There is provided an image processing system comprising scene lighting estimation logic configured to determine local irradiance estimates for a scene, wherein the scene lighting estimation logic is configured to: (i) obtain initial irradiance estimates for sample positions on one or more surfaces in the scene, wherein the initial irradiance estimates are based on a global irradiance estimate for the scene, and (ii) obtain visibility indications which indicate the visibility of the sample positions in the scene in dependence on viewing angle, wherein the scene lighting estimation logic comprises: cast shadow processing logic configured to: (i) calculate an angle-dependent radiance estimate for the scene using the obtained initial irradiance estimates and the obtained visibility indications, and (ii) determine local irradiance estimates at the sample positions using the radiance estimate and the visibility indications. The global irradiance estimate may be dependent upon surface normal, and the scene lighting estimation logic may be configured to obtain the initial irradiance estimates for sample positions on one or more surfaces in the scene by determining the initial irradiance estimates by sampling the global irradiance estimate using surface normals of the sample positions.

The image processing system may further comprise: scene analysis logic configured to analyse at least one view of the scene to estimate scene geometry describing the one or more surfaces in the scene, wherein an initial texture may be segmented into a plurality of materials, the initial texture being separable into an intrinsic colour estimate and a corresponding shading estimate; wherein the scene lighting estimation logic may further comprise attached shadow processing logic configured to: determine an initial coarse intrinsic colour estimate for each of the materials; and determine one or more scale factors, for scaling a respective one or more of the initial coarse intrinsic colour estimates, the scale factors being determined based on differences between material irradiance estimates determined for the materials based on shading estimates which correspond with scaled versions of the initial coarse intrinsic colour estimates of the materials; wherein the scene lighting estimation logic is configured to determine the global irradiance estimate as a function of surface normal using the determined scale factors. The attached shadow processing logic may be configured to determine the initial coarse intrinsic colour estimate, for each of the materials, by finding the average of the values in the initial texture for the material. The scene lighting estimation logic may be configured to determine the global irradiance estimate using the determined scale factors by: scaling the one or more of the initial coarse intrinsic colour estimates using the determined scale factors; and using the scaled coarse intrinsic colour estimates to determine the global irradiance estimate as a function of surface normal. The scene lighting estimation logic may be configured to use the scaled coarse intrinsic colour estimates to determine the global irradiance estimate by: combining the scaled coarse intrinsic colour estimates to form a global coarse intrinsic colour estimate; and using the global coarse intrinsic colour estimate to determine the global irradiance estimate as a function of surface normal. Furthermore, the scene lighting estimation logic may be further configured to fit second order spherical harmonics to the global irradiance estimate to thereby denoise the global irradiance estimate. The scene lighting estimation logic may be configured to determine one or more scale factors by: determining a measure of the differences between material irradiance estimates for different materials in overlapping regions of the material irradiance estimates, said measure of the differences being dependent upon the scale factors, wherein for a particular scale factor the material irradiance estimate for a material matches the shading estimate which corresponds with a version of the initial coarse intrinsic colour estimate scaled with the particular scale factor; and determining the scale factors so as to minimise the measure of the differences.

The cast shadow processing logic may be configured to determine the visibility indications based on estimated scene geometry describing the one or more surfaces in the scene determined by analysing at least one view of the scene.

The cast shadow processing logic may be further configured to use the local irradiance estimates to determine an intrinsic colour estimate for a texture.

The visibility indications may be in the form of spherical harmonic coefficients, b_(x,k), for sample position x and for the k^(th) order spherical harmonics up to the K^(th) order spherical harmonics.

The cast shadow processing logic may be configured to calculate the angle dependent radiance estimate for the scene by determining spherical harmonic coefficients r_(k) for the k^(th) order spherical harmonics up to the K^(th) order spherical harmonics, in accordance with the equation:

R*=(B ^(T) R)⁻¹ B ^(T) I _(E),

where R* is a vector of the spherical harmonic coefficients r_(k) for the radiance estimate, B is a matrix of the spherical harmonic coefficients b_(x,k) for the visibility indications and I_(E) is a vector of the obtained initial irradiance estimates for the sample positions, x.

The cast shadow processing logic may be configured to determine the local irradiance estimate I(x) at sample position x in accordance with the equation:

I(x)=Σ_(k=1) ^(K) b _(x,k) r _(k)

where b_(x,k) is the k^(th) order spherical harmonic coefficient for the visibility indications at sample position x, and where r_(k) is the k^(th) order spherical harmonic coefficient for the radiance estimate. K may be in the range 10≦K≦16. For example, K may be 14.

There may be provided computer readable code adapted to perform the steps of the any of the methods described herein when the code is run on a computer. Furthermore, there may be provided computer readable code for generating a processing block configured to perform any of the methods described herein. The computer readable code may be encoded on a computer readable storage medium.

The above features may be combined as appropriate, as would be apparent to a skilled person, and may be combined with any of the aspects of the examples described herein.

BRIEF DESCRIPTION OF THE DRAWINGS

Examples will now be described in detail with reference to the accompanying drawings in which:

FIG. 1 represents an arrangement in which a plurality of cameras are arranged to capture different images of a scene;

FIG. 2 is a schematic diagram of an image processing system;

FIG. 3 is a flowchart for a process of determining an intrinsic colour component of a relightable texture and a set of surface normals for use in rendering an image from a rendering viewpoint under arbitrary lighting conditions;

FIG. 4 shows a more detailed view of one of the steps of the flowchart shown in FIG. 3;

FIG. 5 shows two views of a scene from two camera viewpoints, and shows a rendered image for the scene from a rendering viewpoint;

FIG. 6 shows two examples of the separation of an original image into a colour estimate and a shading estimate;

FIG. 7 shows an example of components of first surface normal estimates and components of refined surface normal estimates; and

FIG. 8 shows a computer system in which an image processing system may be implemented.

The accompanying drawings illustrate various examples. The skilled person will appreciate that the illustrated element boundaries (e.g., boxes, groups of boxes, or other shapes) in the drawings represent one example of the boundaries. It may be that in some examples, one element may be designed as multiple elements or that multiple elements may be designed as one element. Common reference numerals are used throughout the figures, where appropriate, to indicate similar features.

DETAILED DESCRIPTION

Embodiments will now be described by way of example only. The examples described in detail herein relate to free-viewpoint rendering, but the same principles of determining a relightable texture can be applied in other examples, e.g. in which there is only one camera (rather than multiple cameras as in free-viewpoint rendering) which can move to capture multiple views of a scene from different angles, and/or in which the rendering viewpoint is the same as a camera viewpoint.

Free-viewpoint rendering allows an image to be generated to provide a novel view of a scene based on a set of multiple images of the scene from multiple camera viewpoints. As an example, the generated image may be a frame within a generated video sequence. Free-viewpoint video rendering (FVVR) is the synthesis of novel views of a scene that changes with time, with reference to video data captured using a set of cameras. Most standard FVVR systems do not support relighting of the scene. However, examples described herein allow a scene to be relit and viewed under arbitrary lighting conditions when the scene is rendered from the novel viewpoint. For example, this can be used to relight an actor's performance for seamless compositing into arbitrary real-world and/or computer generated surroundings which may have different lighting conditions to those in which the images of the actor are captured. For example, where the images represent a frame of a video sequence the examples described herein relate to “relightable FVVR”. The appearance of a scene can be represented as a function of multiple parameters including: (i) the intrinsic colour (which may be referred to as “albedo”) of objects in the scene, (ii) the surface normals of the surfaces of objects in the scene, (iii) the specularity of surfaces in the scene, and (iv) the scene lighting. In methods described herein, the appearance of a scene is broken down into estimates of these four parameters, and the colour estimates (i.e. the albedo estimates) and surface normals may be used to subsequently render an image of the scene from a rendering viewpoint under arbitrary lighting conditions. It is not a simple problem to separate the appearance of a scene into the four parameters, in particular if the scene lighting in which the images of the scene are captured is unknown. For example, it is not trivial to determine the difference between a surface that has a bright intrinsic colour but is poorly lit and a surface that is well lit but has a darker intrinsic colour. That is, there is often an ambiguity between shading and albedo.

The ambiguity between shading and albedo is particularly difficult to resolve when the scene includes specular components on the surfaces of objects in the scene caused by the scene lighting. Some of the examples described herein allow specular components of the original images to be separated from diffuse image components. The term “diffuse” is used herein and may be interpreted as meaning “matte” or “non-specular”. The diffuse image components (without the specular components) can then be used to solve the ambiguity between shading and albedo. By separating the specular components from the diffuse components, a method adapted for solving the ambiguity between shading and albedo based on a diffuse lighting model (e.g. a Lambertian lighting model) can be used for scenes which have significant specular components, i.e. scenes for which the specular components are not negligible.

Furthermore, some of the examples described herein allow surface normals to be refined such that they better represent physical surfaces. This is achieved by enforcing conservatism of the surface normal field, based on an appreciation that surface normals of physical surfaces of objects represent conservative surface normal fields.

Furthermore, some of the examples described herein provide a method for handling cast shadows in the scene. This allows local occlusion to be taken into account when determining irradiance estimates for the sample positions in the scene. This is achieved by determining an initial estimate of irradiance by ignoring local occlusion, then using that initial irradiance estimate with knowledge of the scene geometry to determine an angle-dependent radiance estimate for the scene. This radiance estimate can then be used with the knowledge of the scene geometry to determine local irradiance estimates at the sample positions within the scene.

FIG. 1 shows an object (e.g. a person 102) which is part of a scene. Eight cameras 104 ₁ to 104 ₈ are shown in FIG. 1 which are capturing different images of the scene from respective camera viewpoints. However, the system for capturing the images of the scene is not limited to using eight cameras and in other examples a different number of cameras (e.g. fewer than eight or more than eight cameras) may be used to capture images of the scene. In the example shown in FIG. 1 the scene comprises the person 102 in view of all eight of the cameras 104 against a plain (e.g. monochromatic) background. The images captured by the cameras 104 may be frames of a video sequence, but in other examples the cameras capture images of a scene for use in rendering an image at a single point in time, i.e. the rendered image might not be a frame of a video sequence. In this example, the cameras are calibrated with reference to a common coordinate system, and the frames of video captured by each camera 104 are captured at synchronized timings. Furthermore, although not essential, it may simplify the implementation of the image processing system if all of the cameras have the same operating parameters, e.g. the same number of pixels, the same formatting protocol, etc., so that the image data representing the views of the scene can be combined without further steps of converting data captured by one or more of the cameras into a different format. The eight cameras 104 provide eight different camera viewpoints of the scene. However, with the use of FVVR, the scene may be rendered from a rendering viewpoint which might not be the same as any of the camera viewpoints. For example, FIG. 1 shows a rendering viewpoint which is different to all of the eight camera viewpoints. If the cameras are synchronized then each view of the scene is captured by all of the cameras simultaneously. In other examples, it is possible to use unsynchronized cameras but it becomes more difficult to combine the different views of the scene because time, as well as space, becomes a variable that is taken into account in combining the views of the scene.

FIG. 5 shows a first image 502 of the scene taken from the viewpoint of the camera 104 ₁. The scene includes the person 102 against the plain background. FIG. 5 also shows a second image 504 of the scene taken from the viewpoint of the camera 104 ₂. FIG. 5 also shows a novel view 506 of the scene from the rendering viewpoint which has been rendered according to methods described herein. It can be seen that the rendering viewpoint is between the camera viewpoints of the cameras 104 ₁ and 104 ₂.

FIG. 2 shows an image processing system 200 (e.g. a video processing system in the case that the images are frames of a video sequence) which comprises a processing block 202 and a store 228. The processing block 202 comprises scene analysis logic 204, colour calibration logic 205, specularity separation logic 206, specular radiance estimation logic 208, projective texturing logic 210, scene lighting estimation logic 212, shading estimation logic 214, first surface normal logic 216, height map construction logic 218, second surface normal logic 220 and specular colour estimation logic 222. The scene lighting estimation logic 212 comprises attached shadow processing logic 213 and cast shadow processing logic 215. The combination of the projective texturing logic 210, the scene lighting estimation logic 212 and the shading estimation logic 214 may be considered to be intrinsic colour component determining logic 224 because they act (amongst other functions) to determine an intrinsic colour component of a texture. Furthermore, the combination of the first surface normal logic 216, the height map construction logic 218 and the second surface normal logic 220 may be considered to be surface normal estimation logic 226 because they act to determine surface normal estimates for the surfaces of the scene geometry. It is noted that, in some examples, some of the logic blocks 204 to 226 which are represented separately in FIG. 2 may be combined such that their functionality is not implemented in separate blocks. The logic blocks 204 to 226 may for example be implemented on the processing block 202 in hardware. For example, if a logic block is implemented in hardware it may be formed as a particular arrangement of transistors and other hardware components which is suited for performing the desired function of the logic block. In contrast, the logic blocks 204 to 226 may be implemented by executing software which thereby configures hardware (e.g. general purpose hardware such as a CPU) to implement the functions of the logic blocks 204 to 226 as described herein. The software may comprise a set of computer instructions which can be stored in a memory and can be provided to the processing block 202 for execution thereon, wherein the processing block 202 may be implemented on a processing unit, such as a Central Processing Unit (CPU) or a Graphics Processing Unit (GPU). The processing block 202 is configured to receive data representing the images of the scene from the cameras 104. For example, one of the cameras 104 may, or may not, be implemented in the same device as the image processing system 200. The processing block 202 is configured to process the images of the scene (e.g. using the logic blocks 204 to 226) to determine an intrinsic colour component, ρ(x), of a relightable texture and a set of surface normals n_(r)(x) for use in rendering an image from the rendering viewpoint under arbitrary lighting conditions. The store 228 may be implemented as a memory for storing the intrinsic colour components of relightable textures and the sets of surface normals.

Operation of the image processing system 200 is described with reference to the flow chart shown in FIG. 3. In the examples described in detail herein, the method steps shown in FIG. 3 are performed offline, i.e. before the scene is to be rendered from the rendering viewpoint. In other examples, the method steps shown in FIG. 3 may be performed at runtime, i.e. as the scene is being rendered, but this requires a large amount of processing resources for the render which are usually not available, e.g. on a mobile device. The method steps shown in FIG. 3 may be performed responsive to the images of the scene being captured by the cameras 104. As described in more detail below, a model (or “proxy”) of the scene geometry is constructed based on the different images of the scene and an intrinsic colour component of a relightable texture is formed which can be applied to the model. The intrinsic colour component of the relightable texture and a set of surface normals for the scene can then be stored, e.g. in the store 228. Subsequently, at render time, the intrinsic colour component (or “albedo”) of the relightable texture and the set of surface normals can be retrieved from the memory and the scene can be rendered from the rendering viewpoint. The surface normals are used to relight the texture using the lighting conditions that are appropriate for the rendered scene, which may be different to the lighting conditions of the scene when the images were captured by the cameras 104. The estimated surface normals compensate for high-frequency geometry which is missing from an MVS reconstruction. Since in the examples described in detail herein, much of the processing is front-loaded (i.e. performed before the scene is rendered), the processing that is performed during rendering is reduced. The offline steps (i.e. preprocessing steps) performed before the rendering of the scene to determine the intrinsic colour component of the relightable texture and the surface normals representing the scene may be implemented in a computer with substantial available resources, e.g. processing power and memory. The preprocessing steps may take a significant time to complete, e.g. such that each frame may take of the order of tens of minutes (e.g. 20 minutes) to process (including the MVS reconstruction stage). The rendering of the scene from the rendering viewpoint may be implemented on the same device or a different device as that which performed the preprocessing steps. For example, the output from the preprocessing steps (i.e. the intrinsic colour component of the relightable texture and the set of surface normals) may be provided to a rendering device, such as a mobile device for rendering an image from an arbitrary rendering viewpoint under arbitrary lighting conditions. The output from the preprocessing steps may be used to render multiple images for a scene, where each image may be rendered from a different rendering viewpoint and with different lighting conditions. When the image is a frame of a video sequence, and the video is rendered, the video may be output in real-time, with multiple frames (e.g. twenty frames) being processed per second. The processing resources of the rendering device may be limited; this is particularly the case when implementing the renderer on a mobile device for which the processing power and memory capacity may be significantly limited. Since a substantial amount of the processing is performed in the preprocessing steps, the processing performed at the time of rendering is reduced, which can allow a video to be rendered and output in real-time (e.g. at at least approximately 20 frames per second) even on rendering devices such as mobile devices which may have limited resources available.

In step S302 one or more images of the scene are received at the processing block 202 from the cameras 104. In particular, the images of the scene are received at the scene analysis logic 204. The data representing the images of the scene may be provided from the cameras 104 to the processing block 202 via any suitable link, e.g. a wired or wireless link. As mentioned above it may be the case that one of the cameras 104 is implemented in the same device (e.g. a mobile device) as the image processing system 200. Therefore, in some examples, the method may comprise capturing at least one of the images of the scene from a respective at least one of the camera viewpoints, but in other examples, none of the images are actually captured by a camera in the same device in which the image processing system 200 is implemented.

In step S304 the scene analysis logic 204 analyses the images of the scene to construct the geometry representing the object(s) in the scene, thereby determining a model of the scene. There are many ways of constructing the geometry, e.g. a 3D geometric proxy of the scene geometry may be constructed using a Multiple View Stereo (MVS) technique, as is known to those skilled in the art. These processes are generally known as “image-based reconstruction” in the art.

In step S306 the scene analysis logic 204 projects the images from the different camera viewpoints onto the geometry. Methods for projecting the images onto the geometry are known in the art. It will be appreciated that each image of the scene will usually include data for some, but not all, of the surfaces of the objects of the scene geometry onto which that image can be projected. For example, an image of the front of the person 102 may not include any data for projection onto the back of the person 102 in the model of the scene. However, preferably all of the surfaces of the model of the scene are in view of at least one of the cameras 104 such that the combination of views of the scene from the different cameras 104 can be used to project a view onto the whole of the model of the scene.

It can therefore be seen that in steps S304 and S306 the scene analysis logic 204 may perform MVS reconstruction and texture projection. As an example, the use of a wide-baseline capture system favours the use of a visual hull to produce a coarse upper-bound to the scene geometry, which can subsequently be refined by triangulating the positions of features extracted from surface detail. It may be the case that the projected images are not exactly aligned with each other when they are projected onto the scene geometry. This may, for example, be due to slight inaccuracies in the construction of the geometry. Inaccuracies such as these may be detrimental to the specularity removal process which is described below, e.g. the inaccuracies may cause “ghosting” artifacts to appear. Therefore, step S306 may involve warping at least one of the images such that the projected images are better aligned with each other. For example, an optical flow technique is a technique known to those skilled in the art which may be used to warp one or more of the images. That is, in an example, optical flow based projected texture alignment may be used to mitigate errors introduced by coarse MVS reconstruction, allowing the ghosting artefacts to be removed (or at least reduced) for more accurate results.

The images, the model geometry and the textures described herein may each be represented by an array (e.g. a 2D array) of spatially distinct units, x, which can each have one or more values associated with them. As a matter of terminology, these spatially distinct units may be referred to with different terms. That is, the spatially distinct units of an image (in display-space) which is intended to be viewed are referred to herein as “pixels”; the spatially distinct units of a texture (in texture-space) are referred to herein as “texels”; and the spatially distinct units of the model (in the 3D model-space) are referred to herein as “fragments”, wherein each fragment corresponds to a “sample position” of a texture applied to a surface of the scene geometry.

Furthermore, in step S307 the colour calibration logic 205 performs colour calibration of the images to better match colour between the images for greater consistency in the resultant texture. It is noted that the cameras 104 which are used to capture the images might not be perfectly calibrated with each other. Therefore, the image values (e.g. colour and intensity) of an image may depend on the camera which has captured the image. A colour calibration process which may be used is based on an assumption that the images values are dominated by diffuse components such that the image values are not strongly dependent on the viewing angle. If this assumption is not valid, then the colour calibration process might not be performed. So using this assumption, the image values projected onto a sample position should be the same (or at least approximately the same). If there are differences between the image values projected onto the same sample position then the colour calibration process can be used to reduce the differences between the projected images. For example, the colour calibration of the images may involve comparing the image values, x_(i), for the projected images at the sample positions of the texture and finding a scale parameter, a_(i), and an offset parameter, b_(i), for each of the projected images such that differences between calibrated image values, (a_(i)x_(i)+b_(i)), for the different images, i, are minimized. The scale parameter and the offset parameter for an image are the same for all of the sample positions. There might not be a perfect solution, but the best fit for the scale and offset parameters for the images can be found and used to calibrate the images accordingly. This can help to reduce the differences between the different images which can therefore help to reduce errors in the separation of the diffuse and specular components of the images. A colour calibration process such as this is particularly useful if different types of cameras are used to capture the different images, and/or if the quality of the cameras used to the capture the images is not high, e.g. if the camera of a mobile device such as a smartphone or a tablet is used to capture one or more of the images. In these situations, it is likely that the initial images will not be well calibrated with each other, such that the colour calibration process may be particularly useful.

An indication of the scene geometry and the projected image values (i.e. the values of each of the images as projected onto the sample positions of the texture) are provided to the specularity separation logic 206.

In step S308 the specularity separation logic 206 determines, at each of a plurality of the sample positions of the texture, a diffuse image component value based on the minimum of the images values at the sample position from a set of a plurality of the images. This may be achieved in different ways in different examples. For example, for each sample position at which a diffuse image component value is determined, the set of images from which the minimum is found may comprise some or all of the images in which the sample position is visible. The set of images may be formed for each sample position independently. However, it may be beneficial to exclude an image from the set for a sample position if the direction of the viewpoint for the image is significantly different to the surface normal at the sample position. This is because if glancing views of a surface in the scene are used then the image may be “smeared” across the surface, i.e. blurred over a number of sample positions. Smeared projections may corrupt the specularity removal process, so these images are preferably excluded from the set of images from which a minimum image value is found. For example, the set of images for a sample position may include only those images for which an angle between a surface normal at the sample position and a viewing direction of the camera viewpoint for the image is less than a threshold angle, wherein to give some examples, the threshold angle may be 30 degrees, 45 degrees or 60 degrees.

In some examples, just one diffuse image component value may be determined for each of the sample positions of the texture on the surfaces of the geometry. In other examples, such as those described in more detail below, diffuse image component values are determined at sample positions for each of the images which have visibility of the sample positions.

It is noted that specular scenes present a problem to intrinsic image estimation methods, which often use a Lambertian lighting model, which only considers diffuse lighting. However, many real-world scenes have strong specular components which cannot be neglected. The methods described in detail herein separate the specular components of the images from the diffuse components so that the diffuse components can be used in an intrinsic texture estimation method. Specular components are view-dependent, whereas the diffuse components should, by their nature, not be dependent upon the viewing angle. The separated specular and diffuse (or “matte”) components can be subsequently processed separately. In some examples, as described below, the specular components can be used in a specular albedo estimation process.

The appearance of a specular surface at a particular sample position x and viewing direction ω₀ can be considered to be a sum of a diffuse image component and a specular image component. For example, as described below, the projected image values may form a texture T(x, ω₀) which can be given by:

T(x,ω ₀)=ρ(x)I(x)+σ(x)J(x,ω ₀),  (1)

where I(x) is the total non-reflected incident energy, i.e. the irradiance at the sample position x, ρ(x) is a diffuse albedo at the sample position x, σ(x) is a specular albedo at the sample position x, and J(x, ω₀) is the strength of reflected light from the sample position x in the direction ω₀. We can say that the first term on the right hand side in equation 1 represents a diffuse image component value C^(d)(x) at sample position x, and the second term on the right hand side in equation 1 represents a specular image component value, C^(s)(x, ω₀) at sample position x and in the direction ω₀.

In the examples in which diffuse image component values are determined for each of the images (assuming accurate colour calibration), for a particular image (which may be referred to as “the reference image”), the diffuse image component value at each of the sample positions may be determined based on the minimum of the image values at the sample position from a set of images comprising the particular image and at least one other image which has visibility of the sample position. For example, the reference image may be captured from a reference camera viewpoint and it may be compared with images captured from camera viewpoints which are the nearest neighbours of the reference camera viewpoint. The nearest neighbours are used because they are likely to have visibility of the same sample positions on the geometry as the reference image, and also because this is likely to reduce the extent to which the different camera viewpoints will have glancing views of the surfaces of the geometry in the scene (which as described above may cause the image to be smeared across the surface). For example, the reference image C_(r)(x) can be considered to be a sum of diffuse and specular image component values, i.e. C_(r)(x)=C_(r) ^(d)(x)+C_(r) ^(s)(x). The two nearest neighbours to the reference image are C_(a)(x) and C_(b)(x). In step S308 the diffuse image component values for the reference image can be found by finding the minimum of the image values C_(r)(x), C_(a)(x) and C_(b)(x) at each of the sample positions, x. That is:

C _(r) ^(d)(x)=min(C _(r)(x),C _(a)(x),C _(b)(x)).  (2)

In this way the diffuse image component values of the reference image can be recovered provided the specular highlights do not coincide in all three camera views. It is assumed that the specular highlights do not coincide in all three camera views, and in practice, this is seldom a significant problem especially for models with high-frequency surface detail. This method may be repeated for each of the images (e.g. each of the 8 images captured by the cameras 104) such that diffuse image components are determined for each of the images.

In step S310 the specularity separation logic 206 determines specular image component values for each of the images by subtracting the diffuse image component values for the image from the image values at the sample positions of the texture. Therefore, the specular image component values for the reference image are given by C_(r) ^(s)(x)=C_(r)(x)−C_(r) ^(d)(x).

The diffuse image components, C^(d)(x), for the images are outputted from the specularity separation logic 206 and provided to the projective texturing logic 210 of the intrinsic colour component determining logic 224. The intrinsic colour determining logic 224 uses the diffuse image component values to determine an intrinsic colour component (i.e. an albedo) for a relightable texture as described below. The specular image components; C^(s)(x), for the images are outputted from the specularity separation logic 206 and provided to the specular radiance estimation logic 208.

In step S312 the projective texturing logic projectively textures the geometry using the diffuse image component values from each of the images. The diffuse images have already been projected onto the geometry (in step S306), such that they have image values at the sample positions of the texture, and in step S312 the projected diffuse image components are combined to form a texture, T(x). Techniques for combining image values to form a texture are known in the art. The texture T(x) is provided from the projective texturing logic 210 to the scene lighting estimation logic 212 and to the shading estimation logic 214.

In step S314 the scene lighting estimation logic 212 uses the texture T(x) (which is formed from the diffuse image components values of the images) to determine a lighting estimate for the scene. Then in step S316 the shading estimation logic 214 uses the lighting estimate to separate the texture (which is formed from the diffuse image components values of the images) into an intrinsic colour component ρ(x) of a relightable texture and a surface shading estimate S(x) for each of the sample positions of the texture. The way in which steps S314 and S316 are performed may vary in different implementations. Details of one way in which these steps may be performed are provided below.

First, some theory is explained which will be useful for the examples described below. Equation 3 below gives the irradiance I(x) (shading) at a sample position x on the surface of an object, according to the Lambertian appearance model:

I(x)=∫_(Ω) B(x,ω)R(ω)dΩ,  (3)

where

T(x)=ρ(x)I(x),  (4)

B(x,ω)=V(x,ω)max(0,ω^(T) n(x)),  (5)

and where R(ω) is the radiance function and B(x, ω) is a function describing the local occlusion and foreshortening at a sample position, V(x, ω) is a binary visibility mask at sample position x and viewing direction ω, and max(0, ω^(T)n(x)) accounts for the dependence of received energy on angle of incidence. n(x) is the surface normal at the sample position x. The integral is over the surface of the sphere Ω. T(x) is the appearance at x and ρ(x) is the albedo at sample position x.

Two types of shadows are treated differently in the examples described herein: attached shadows and cast shadows. An “attached shadow” is present at a sample position on the geometry due to the dot product between the surface normal at the sample position and the lighting direction, but an “attached shadow” does not take local occlusion into account. A “cast shadow” is present at a sample position on the geometry due to another part of the geometry being between it and the light source. Accurate estimation of ρ(x) uses an estimate of the scene radiance R(x) which is estimated concurrently. This is solved in two stages. First, the texture T(x) is segmented into regions of similar appearance, and the attached shadow processing logic 213 obtains a coarse albedo estimate ρ_(c)(x) based upon the initial segmentation by neglecting the visibility term V(x, ω) in Equation 5 and dealing directly with a global irradiance estimate. In a second stage, the cast shadow processing logic 215 uses the albedo estimate ρ_(c)(x) to initialise a full radiance estimate taking visibility into account.

So in the first stage, ignoring visibility, the following equation for global irradiance is obtained:

I _(G)(n)=∫_(Ω)max(0,ω^(T) n)R(ω)dΩ  (6)

The dependence on sample position x has been removed, allowing the global irradiance function I_(G)(n) to be treated as a function over the sphere, sampled at each sample position on the surface by surface normal. I_(G)(n) is a convolution of R(ω) with the clamped-cosine kernel max(0, ω^(T)n). The problem of estimating irradiance at each sample position x on the surface has now been simplified to one of finding this global irradiance function.

In an example, the texture T(x) is initially segmented in the mesh tangent space of the geometry into a number of regions of similar appearance, each of which is assigned a preliminary albedo estimate. Points on a surface of the geometry with similar surface normals should be lit similarly, and this concept can be used to perform albedo balancing of the intrinsic colour components of the segments of the texture. Segmenting the texture T(x) and assigning per-segment albedos for subsequent refinement is an efficient way of initialising the albedos. An “albedo” may also be referred to herein as an “intrinsic colour component”. Methods for segmenting a texture into regions of similar appearance are known to those skilled in the art. For each segment u in the segmentation U, the attached shadow processing logic 213 finds an initial albedo estimate a′_(u) by averaging the texel values in that segment. That is, the initial albedo estimate a′_(u) for the segment u is given by:

$\begin{matrix} {a_{u}^{\prime} = {\frac{1}{u}{\sum\limits_{x \in u}{{T(x)}\mspace{14mu} {\forall{u \in U}}}}}} & (7) \end{matrix}$

The ambiguity between irradiance and shading for each segment is resolved using the fact that shading is strongly correlated with surface normal direction, and irradiance varies slowly across the surface. In this way, a coarse, segment-based albedo estimate ρ_(c) can be recovered from a single frame. A globally-optimal, closed-form solution to the problem of albedo balancing for a static scene is achieved by estimating a global irradiance function, which will subsequently be refined (by the cast shadow processing logic 215) to take local occlusion into account.

In the case of monochromatic lighting, the initial estimate of segment albedo a′_(u) is a scaled version of the final albedo a_(u), so that k_(u)a_(u)=a′_(u). The problem of finding the correct ratios of segment albedos a_(u) is equivalent to determining the multipliers k_(u). This can be repeated for each colour channel in the case of general scene lighting.

An initial per-segment shading estimate S_(u)(x) is given by:

$\begin{matrix} {{S_{u}(x)} = \frac{T(x)}{a_{u}^{\prime}}} & (8) \end{matrix}$

Making use of the fact that the low-frequency shading can be considered as samples of the irradiance function, S_(u)(x) can be projected along the coarse surface normal n_(c)(x) provided by the MVS scene reconstruction to give an estimate I′_(u)(n_(c)) of the global irradiance function I_(G)(n_(c)) at that sample position, such that:

I _(G)(n _(c)(x))≈k _(u) I′ _(u)(n _(c)(x))=k _(u) S _(u)(x)  (9)

The sum of squared error in the overlap between the local irradiance estimates I′_(u) is minimised by appropriate choices of k_(u). For two materials i,jεU, let Q_(i,j) be the binary support function giving the overlap between I′_(i) and I′_(j). The sum of squared error is given by:

E=Σ _(i)Σ_(j>i)[∫_(Ω)(k _(i) I′ _(i)(θ,φ)−k _(j) I′ _(j)(θ,φ))Q _(i,j) dΩ] ²  (10)

E=Σ _(i)Σ_(j>i) [k _(i) g _(ij) −k _(i) g _(ji)]²  (11)

where

g _(ij)=∫_(Ω) I′ _(i)(θ,φ)Q _(i,j) dΩ  (12)

Iterative refinement of equation 10 can be avoided by finding a globally optimal k which corresponds to the null-space of a matrix G, defined as:

$\begin{matrix} {\frac{\partial E}{\partial k_{i_{0}}} = {{2{\sum\limits_{i \neq i_{0}}{\left( {{k_{i_{0}}g_{i_{0}i}} - {k_{i}g_{{ii}_{0}}}} \right)g_{i_{0}i}}}} = 0}} & (13) \\ {{{k_{i_{0}}{\sum\limits_{i \neq i_{0}}g_{i_{0}i}^{2}}} - {\sum\limits_{i \neq i_{0}}{g_{{ii}_{0}}g_{i_{0}i}k_{i}}}} = 0} & (14) \\ {G = \begin{pmatrix} {\sum\limits_{i \neq 1}g_{1i}^{2}} & {{- g_{12}}g_{21}} & \ldots & {{- g_{1n}}g_{n\; 1}} \\ {{- g_{21}}g_{12}} & {\sum\limits_{i \neq 2}g_{2i}^{2}} & \ldots & {{- g_{2n}}g_{n\; 2}} \\ \vdots & \vdots & \ddots & \vdots \\ {{- g_{n\; 1}}g_{1n}} & {{- g_{n\; 2}}g_{2n}} & \ldots & {\sum\limits_{i \neq n}g_{ni}^{2}} \end{pmatrix}} & (15) \end{matrix}$

where k is a non-zero vector with k_(i)>0 ∀i such that Gk=0. As an example, Singular Component Analysis (which may be referred to as “SVD”) may be applied to G, wherein k is the right singular vector with a corresponding singular value of zero. k is scaled so that the elements lie in the range 0<k_(i)≦1. This approach finds the global optimum of the cost function in a single step and does not suffer from slow convergence or local minima.

These multipliers are applied to the initial albedo estimates, to provide the globally balanced coarse albedo ρ_(c)(x). It should be noted that this method is suited for use with smooth meshes, since it relies on overlaps between per-segment lighting estimates. For example, it gives good results for human actors, but it would degrade for angular man-made objects.

The method described above, performed by the attached shadow processing logic 213 accounts for “attached” shadows in the scene (i.e. a sample position on the geometry being in shadow due to the dot product between the surface normal at the sample position and the lighting direction), but does not take local occlusion into account, so does not remove “cast” shadows (i.e. a sample position on the geometry being in shadow due to another part of the geometry being between it and the light source). A method is now described that jointly estimates cast shadows with radiance.

The cast shadow processing logic 215 determines local irradiance estimates for the scene. The global irradiance estimate for the scene determined by the attached shadow processing logic 213 is a function of surface normal. It is noted that the global irradiance estimate may be denoised by fitting second order spherical harmonics to the global irradiance estimate. The cast shadow processing logic 215 uses the global irradiance estimate for the scene with scene geometry to determine local irradiance estimates at respective sample positions in the scene. In order to do this, initial estimates for the irradiance at respective sample positions are made based on the global irradiance estimate and the surface normal at the respective sample positions. These initial irradiance estimates do not take account of local occlusion in the scene. The cast shadow processing logic 215 can then use the scene geometry to take account of local occlusion in the scene in order to determine local irradiance estimates at the sample positions, as described below.

For example, initial irradiance estimates can be obtained based on the globally balanced coarse albedo ρ_(c)(x) determined by the attached shadow processing logic 213. In particular, I(x) represents the irradiance (the total incident radiation) at a sample position x on the surface. This is approximated from T and ρ_(c) as I(x)≈T(x)/ρ_(c)(x). This estimate will be used to find the global radiance function R(ω), which is then used to update I(x) with the cast shadows. The cast shadow processing logic 215 also obtains visibility indications which indicate the visibility of the sample positions in the scene in dependence on viewing angle. Using the obtained initial irradiance estimates and the obtained visibility indications, the cast shadow processing logic 215 calculates an angle-dependent radiance estimate for the scene. The cast shadow processing logic 215 can then use this radiance estimate in conjunction with the visibility indications to determine local irradiance estimates at the sample positions. Having knowledge of the scene geometry allows the visibility indications to be determined and it is this knowledge which adds extra information to allow the initial irradiance estimate to be refined by calculating the radiance estimate from the initial irradiance estimates and then calculating the local irradiance estimates from the radiance estimate. The local irradiance estimates I(x) may be used to determine an intrinsic colour estimate ρ_(s)(x) for the texture T(x) according to the equation:

${\rho_{s}(x)} = {\frac{T(x)}{I(x)}.}$

A more detailed explanation of the operation of the cast shadow processing logic 215 is provided below.

To estimate the radiance function, a closed-form, least squares solution is found. This step is initialised using the albedo estimates determined as described above, and is not limited to dynamic scenes or to scenes with constant albedo. As functions over the sphere, both R(ω) and B(x, ω) in equation 3 above can be expressed in terms of the spherical harmonic basis {Y_(k)}:

I(x)=∫_(Ω)(Σ_(k=1) ^(∞) b _(x,k) Y _(k))(Σ_(k=1) ^(∞) r _(k) Y _(k))dΩ  (16)

where B(x, ω)=Σ_(k=1) ^(∞)b_(x,k)Y_(k) and R(ω)=Σ_(k=1) ^(∞)r_(k)Y_(k). By the orthonormality of the spherical harmonic basis, equation 16 simplifies to:

I(x)=Σ_(k=1) ^(∞) b _(x,k) r _(k)  (17)

which may be approximated by the partial sum up to the K^(th) term as Σ_(k=1) ^(K) b_(x,k)r_(k).

The coefficients r_(k) are to be determined, given I(x) and b_(x,k). The initial irradiance estimates I(x) at the sample positions x may be used to form a vector I_(E) of the initial irradiance values at each sample position. For a large set of points M on the surface, such that M>>K, this can be expressed as an energy functional E(R_(SH)) to be minimised:

E(R _(SH))=|B _(SH) R _(SH) −I _(E)|₂ ²  (18)

where R_(SH) is a vector of the spherical harmonic lighting coefficients r_(k), and B_(SH) is a matrix of the visibility coefficients b_(x,k). The energy functional can be minimised using linear least squares. The minimiser R*_(SH) is given by:

R* _(SH)(B ^(T) _(SH) B _(SH))⁻¹ B _(SH) ^(T) I _(E)  (19)

B(x, ω) is estimated at the mesh vertices by rendering a visibility map in polar projection at each vertex position x. This is projected onto the spherical harmonic basis functions to obtain the coefficients b_(x,k).

R*_(SH) provides an estimate of the radiance which can be used in conjunction with visibility to take into account cast shadows. The accuracy of the radiance estimate is dependent on the level of occlusion in the scene; where the scene is entirely convex, reliable spherical harmonic (SH) reconstructions beyond the second order cannot be found, and indeed are not required for cast shadow removal. For scenes with moderate local occlusion, SH reconstructions of radiance up to the fourth order could be reliably obtained.

Since the motivation for lighting reconstruction is to model cast shadows, reconstructions up to the 14^(th) order spherical harmonics are used in an example. Although these reconstructions are physically unreliable, they yield accurate results for the local irradiance at occluded regions of the surface. It may be beneficial to use up to at least the 10^(th) order spherical harmonics since this provides an accurate reconstruction of the cast shadows. However, going beyond approximately the 16^(th) order spherical harmonics may encourage overfitting (similar to the Gibbs phenomenon), so in preferred examples reconstructions up to the K^(th) order spherical harmonic are used where 10≦K≦16. The constraint that the radiance estimate should be positive for all sample positions x is therefore relaxed, provided the local irradiance estimate obtained from it is positive for all x.

Any colour bias in the irradiance from inaccurate albedo estimation may be removed by setting the brightest point in the irradiance to white, and rebalancing the colour channels appropriately. Having estimated the scene lighting, the albedo estimate can be refined. The local irradiance at each vertex is given by I(x)=Σ_(k=1) ^(K) b_(x,k)r_(k), and is interpolated in each triangle to find the irradiance for each texel of the texture. An improved albedo (i.e. intrinsic colour component of the texture) ρ_(s)(X) is obtained as

${\rho_{s}(x)} = {\frac{T(x)}{I(x)}.}$

However, the coarseness of the scene geometry may prevent completely accurate decomposition of the high frequencies of T into albedo and shading using the above method. For this reason, a fast, bilateral filter based intrinsic image method is introduced to remove high-frequency shading effects from ρ_(s)(x), leaving only the albedo. The use of an adaptive FIR filter for intrinsic image extraction, rather than explicitly minimising an energy functional, simplifies the method and is efficient for application to textures.

An energy functional is used which, when minimised, gives a robust local decomposition of an image T into irradiance (shading) I and albedo (reflectance) ρ (as shown in equation 20 below). The energy functional is efficiently minimised using a modified bilateral filter kernel.

E(ρI)=Σ_(xεP)(β(x)−Σ_(yεN(x)) w(x,y)ρ(y))²+Σ_(xεP)(T(x)/I(x)−ρ(x))²  (20)

where:

w(x,y)=Norm(cos⁻¹({circumflex over (T)}(x)^(T) {circumflex over (T)}(y)),σ_(i1) ²)×Norm(luma(T(x))−luma(T(y)),σ_(i2) ²)  (21)

and

luma(c)=[0.299 0.587 0.114]^(T) [c _(R) c _(G) c _(B)]  (22)

The ̂ operator when applied to a vector, as in equation 21, is used to signify a normalised version of the vector. Therefore the function cos⁻¹ ({circumflex over (T)}(x)^(T){circumflex over (T)}(y)) is the inverse cosine of the dot product between vectors having a unit length in the directions of the colours of the texture at sample positions x and y. The inverse cosine of the dot product of two normalised vectors represents the angle between those two vectors, and it is noted that the colour similarity is a Gaussian over angle in RGB space between two colours, if we imagine those colours as vectors. N(x) is the local neighbourhood of pixel x, which will become the domain of the kernel in the FIR reformulation. P is the set of pixel positions, of which N(x) is a subset. Norm(x,σ²) is a normal distribution over x with variance σ². c_(R), c_(G) and c_(B) are the red, green and blue components of the pixel c respectively. There are two parts to equation 20. The first part “flattens out” regions of similar albedo when minimised, where similarity is defined by the weighting function in equation 21. The second part of equation 20 enforces the relationship T(x)=ρ(x)I(x).

A similar result can be obtained by iteratively minimising the first part only, and updating I after each iteration as I(x)=T(x)/ρ(x) (which is the method used in the examples described in detail herein) according to the equation:

argmin_(ρ) E(ρ)=Σ_(xεP)(ρ(x)−Σ_(yεN(x)) w(x,y)ρ(y))²  (23)

An update step to minimise equation 23 is given by equation 24 below. This has been shown to converge rapidly by experiment. In the intrinsic textures extracted by this method, only a single application was required since the shading frequencies are relatively high. The intrinsic colour component of ρ is preserved between iterations, which is equivalent to enforcing {circumflex over (ρ)}={circumflex over (T)} whilst preserving the colour magnitude of each pixel of ρ.

ρ_(n+1)(x)=Σ_(yεN(x)) w(x,y)ρ_(n)(y)  (24)

This FIR formulation can be written as a modified bilateral filter, as in equation 25 below. This introduces the chromaticity similarity term from equation 21 in addition to the conventional luma term.

The variances σ_(i1) ² and σ_(i2) ² adapt to the local region, and u ensures the filter weights sum to unity.

$\begin{matrix} {{\rho_{n + 1}(X)} = {\frac{1}{u}{\int{{\rho_{n}(y)}{{Norm}\left( {{\cos^{- 1}\left( {{\hat{T}(x)}^{T}{\hat{T}(y)}} \right)},\sigma_{i\; 1}^{2}} \right)} \times {{Norm}\left( {{{{luma}\left( {T(x)} \right)} - {{luma}\left( {T(y)} \right)}},\sigma_{i\; 2}^{2}} \right)}{{Norm}\left( {{{x - y}}_{2},\sigma_{w}^{2}} \right)}{y}}}}} & (25) \end{matrix}$

The rate of convergence and scale of shading features that can be detected depends on the choice of kernel size in equation 25. The high variances σ_(i1) ² and σ_(i2) ² associated with large kernels cause “bleeding” between disconnected regions with similar albedo. Larger kernels also take a long time to convolve with the image. As an example, 15×15 kernels may be used.

Instead of initialising with the original texture T, in the case of textures the albedo estimate ρ_(s), for which global shading has been removed, is used instead. This produces a final shading texture I_(f) and final intrinsic albedo texture ρ_(f).

FIG. 6 shows two examples of separating an original image into an intrinsic colour estimate and a shading estimate. In the first example, the original image 602 ₁ is separated into an intrinsic colour estimate 604 ₁ and a shading estimate 606 ₁. In the second example, the original image 602 ₂ is separated into an intrinsic colour estimate 604 ₂ and a shading estimate 606 ₂. In both examples, it can be appreciated from FIG. 6 that the original image of the scene is separated into an intrinsic colour estimate (604 ₁ or 604 ₂) whilst the lighting effects caused by the particular scene lighting of the captured images are separated out into a shading estimate (606 ₁ or 606 ₂). By separating the intrinsic colour from the shading, the scene can be relit by applying a different lighting effect to the intrinsic colour estimates. In order to correctly apply a different lighting effect to the intrinsic colour estimate, the surface normals of the scene geometry are determined, as described below.

So, following step S316, the image value T(x) at each sample position x has been separated into an intrinsic colour component estimate ρ(x) and a surface shading estimate S(x), such that T(x)=ρ(x)S(x). The intrinsic colour component ρ(x) of the texture can be stored in the store 228, and can be used subsequently to render an image of the scene from a rendering viewpoint under arbitrary lighting conditions.

The surface shading estimates S(x) are provided to the surface normal estimation logic 226. In particular, the surface shading estimates S(x) are provided to the first surface normal logic 216. In step S318 the surface normal estimation logic 226 determines surface normal estimates at the sample positions using the determined lighting estimate I(x) and the determined surface shading estimates S(x) for the sample positions. The surface normal determination of step S318 is described in more detail below with reference to the flow chart in FIG. 4. The determined surface normal estimates for sample positions (shown as n_(r)(x) in FIG. 2) can be stored with the intrinsic colour component of the relightable texture in the store 228. The intrinsic colour component of the relightable texture combined with the surface normal estimates allow the scene to be rendered under lighting conditions which may be different to the lighting conditions under which the original images of the scene were captured.

As described above, the specularity separation logic 206 separates the diffuse image component values from the specular image component values, such that the diffuse image component values can be used to determine the intrinsic colour component estimates ρ(x) and the surface normal estimates n_(r)(x). In some examples, the specular image component values are not used. However, in other examples, the optional step S320 is performed in which specular colour estimates β_(spec)(x) are determined using the specular image component values C^(s)(x). In order to do this, the specular radiance estimation logic 208 determines a radiance estimate using the determined specular image component values of the images C_(i) ^(s)(x).

For example, where prior knowledge is available of which regions of the surfaces of the geometry are specular (such as using a manual pre-segmentation), the specular images C_(i) ^(s) can be used to provide a high quality radiance estimate to aid albedo estimation. The direction to the light source ω_(is) for a given sample position x and viewing direction ω₀ is given by:

ω_(is)=2(n _(c) ^(T)ω₀)n _(c)−ω₀  (26)

For each point in the specular image C_(i) ^(s) for which there is a specular highlight, a sample of the radiance function R(x) can be obtained. Where the coarse surface normal n_(c) is inaccurate, there will be a certain amount of scattering of samples about their point of origin. The radiance samples are recovered using the reflected ray direction at sample point x, as R′(ω_(is))=C_(i) ^(s) (x). This sparse set of samples is meshed and linearly interpolated to produce a full radiance estimate R′. This lighting reconstruction can be used in conjunction with the radiance estimate estimated by the scene lighting estimation logic 212 as described above. In this way, the radiance estimate R′ may be used with the diffuse image component values to determine the intrinsic colour component of the relightable texture. Furthermore, the radiance estimate R′ may be passed to the specular colour estimation logic 222 which uses it to estimate the specular colour component of the relightable texture, i.e. the specular albedo ρ_(spec)(x). The specular colour component ρ_(spec)(x) can be stored with the intrinsic colour component ρ(x) in the store 228, for use in subsequently rendering an image of the scene, although it is noted that the specular albedo ρ_(spec)(x) is stored in a separate texture to the diffuse albedo ρ(x) within the store 228. The specular colour estimate logic 222 may use the surface normals n_(r)(x) when determining the specular albedo ρ_(spec)(x).

In step S322 the intrinsic colour component ρ(x) provided by the shading estimation logic 214, the surface normal estimates n_(r)(x) provided by the surface normal estimation logic 226, and optionally the specular colour estimates ρ_(spec)(x) provided by the specular colour estimation logic 222, are stored in the store 228 for subsequent use in rendering an image of the scene from a rendering viewpoint under arbitrary lighting conditions.

Details of the way in which the surface normal estimation logic 226 determines the estimates of the surface normals in step S318 are provided with reference to the flow chart shown in FIG. 4. It is noted that the surface normals for the “surface” of an object refer to the “visible surface” of the object, which may or may not include the whole surface of object, since it may or may not be the case that the whole of the surface of the object is in view of one or more of the cameras 104. However, it is noted that when MVS is used, there will be very little geometry which is not visible to at least one of the cameras 104.

The surface normal estimation is performed in two stages. In a first step, some surface normal estimates are obtained at the sample positions x on the surface of the object(s) in the geometry. In some examples these initial surface normal estimates may be provided to the surface normal estimation logic 226, but in the examples described in detail herein, these surface normal estimates are determined by the first surface normal logic 216. In particular, the first surface normal logic 216 determines the initial surface normal estimates n_(i)(x) using the determined lighting estimate I(x) and the determined surface shading estimates S(x). The first surface normal logic 216 may also use the coarse surface normals n_(c)(x) for the object(s) in the scene predicted form the geometry constructed for the scene.

The first surface normal logic 216 uses a per-texel approach to fit the surface normals n_(i)(x) in the direction of greatest increase of the irradiance I(x) by optimising against the surface shading estimates of the texture S(x). The lack of dependency on neighbouring texels means that this can be done efficiently in parallel, e.g. using an OpenGL Shading Language (GLSL) fragment shader.

For example, the first surface normal logic 216 may determine the surface normal estimate n_(i)(x) for a sample position x by finding the surface normal which minimizes an error metric E(n(x)) comprising a measure of the difference between the determined surface shading estimate S(x) for the sample position and the determined lighting estimate l(n) for the direction of the surface normal. The error metric further comprises a regularization term Λ(n,n_(c)) which is a function of a difference between the surface normal n(x) for the sample position and a coarse surface normal n_(c)(x) for the sample position predicted from the geometry. That is, the first surface normal logic 216 minimises E(n(x)) to determine n(x) using the global irradiance I(n), where E(n(x)) is given by the equation:

E(n(x))=∥S(x)−I(n)∥₁+Λ(n,n _(c))  (27)

The L1 norm is used in equation 27 because it is robust in the presence of noise. When fitting surface normals, the MVS reconstruction gives a good indication of likely surface normals. That is, large deviations of the fitted normals n(x) from the coarse normals n_(c)(x) are unlikely and are therefore penalised using the regularisation term Λ(n, n_(c)). The regularisation term Λ(n, n_(c)) may for example be defined by the equation:

$\begin{matrix} {{\Lambda \left( {n,n_{c}} \right)} = \left\{ \begin{matrix} {\lambda \left( {\cos^{- 1}\left( {n^{T}n_{c}} \right)} \right)}^{2} & {{n^{T}n_{c}} > 0} \\ \infty & {otherwise} \end{matrix} \right.} & (28) \end{matrix}$

where λ is a parameter which may be determined experimentally. As an example, a value of λ=0.025 may be used.

The surface normals determined by the first surface normal logic 216 are treated as “initial” surface normals n_(i)(x). These surface normal estimates n_(i)(x) represent a first surface normal field N_(i). Since the initial surface normals n_(i)(x) are determined independently of each other, there is no guarantee that they will actually represent a physical surface. That is, errors and/or ambiguities in the determination of the separate surface normal estimates n_(i)(x) are likely to cause the first surface normal field N_(i) to be a non-conservative field. For example, when fitting the surface normals to the shading texture, the surface normals can only be fitted in the direction of the gradient of the lighting estimate l(x), leaving the lateral component unchanged. For example FIG. 7 shows a representation 702 ₀ of the initial surface normals n_(i)(x) determined for an object in the scene which is lit from above. The three representations below 702 ₀ show the x, y and z components of the surface normals n_(i)(x) where the x-axis is horizontal, the y-axis is vertical and the z-axis is out of the page, such that the lighting is aligned with the y-axis. In particular, the representation 702 _(x) shows the x components of the surface normals n_(i)(x), the representation 702 _(y) shows the y components of the surface normals n_(i)(x), and the representation 702 _(z) shows the z components of the surface normals n_(i)(x). It can be seen that the initial surface normal estimates contain little detail in the x and z directions, i.e. perpendicular to the direction of the lighting, but more detail in y direction, i.e. parallel to the direction of the lighting. Furthermore, the initial surface normal estimates may comprise some drift away from the average normal defined by the underlying low-frequency geometry.

It is noted that physical surfaces are associated with conservative surface normal fields. However, the first surface normal field N_(i) may comprise a non-conservative component and a conservative component. That is, the first surface normal field N_(i) is not constrained to be conservative, but it does have a conservative component. The conservative component of the first surface normal field N_(i) may represent a physical surface, therefore if the conservative component of the first surface normal field N_(i) can be determined then this may provide a more realistic estimation of the surface normals of the surface.

The initial surface normals n_(i)(x) determined by the first surface normal logic 216 are provided to the height map construction logic 218. In step S404 the height map construction logic 218 constructs a height map for the surface of an object in the scene based on the conservative component of the first surface normal field N_(i). A field is conservative if the curl of the field at all points is zero. The divergence of the first surface normal field N_(i) can be used for constructing the height map so that the height map is constructed based on the conservative component of the first surface normal field N_(i). Taking the divergence of the first surface normal field N_(i) removes the non-conservative component because the divergence of the curl of any vector field (e.g. ∇.(∇×F)) is zero regardless of the field F.

The surface normal estimation logic 226 determines refined surface normal estimates n_(r)(x) representing a conservative surface normal field N_(r). A conservative vector field can be represented as the gradient of a scalar field. Therefore, real-world surface normal fields should be an alternative representation of a height map, H, such that:

∇H=−N _(r)  (29)

Since the divergence of the first surface normal field N_(i) does not include the non-conservative components of the first surface normal field N_(i), the following equation can be used:

∇.(∇H)=−∇.N _(i)  (30)

The height map can then be constructed using a version of Poisson's equation. For example, an iterative relaxation method can be used to determine a height at each of the sample positions based on the heights at neighbouring sample positions and based on the divergence of the first surface normal field N_(i). The “neighbouring” sample positions may for example be the nearest neighbours horizontally and vertically from a current sample position.

For example, on the i^(th) iteration of the iterative relaxation method, the height H_(i)(x, y) at a sample position (x, y) on the surface of the object may be given by:

H _(i)(x,y)=¼{H _(i-1)(x+δ,y)+H _(i-1)(x+δ,y)+H _(i-1)(x+δ,y)+H _(i-1)(x+δ,y)−δ² ∇·N _(i)}  (31)

Where δ is an interval between adjacent sample positions.

To prevent low-frequency biases in the surface normals from influencing the results, the relaxation method is terminated after a number of iterations such that the relaxation method terminates before convergence. For each iteration, the height value at a sample position takes account of more distant neighbours from the sample position. The number of iterations may be predetermined, and to give some examples may be 3 or 4. Alternatively, the height map construction logic 218 may control the number of iterations, e.g. based on an assessment of previous images which have been processed and whether low-frequency biases in the surface normals are influencing the results.

The height map is provided to the second surface normal logic 220. In step S406 the second surface normal logic 220 uses the height map H to determine refined surface normal estimates n_(r)(x) at the sample positions on the surface of the object. As mentioned above, the refined surface normal estimates n_(r)(x) represent a conservative surface normal field for the surface of the object in the scene. As described above, the gradients of the height map H can be determined to thereby determine the refined surface normal estimates n_(r)(x), according to equation 29 given above. In this way the refined surface normal estimates n_(r)(x) describe a conservative surface normal field N_(r) which can represent a physical surface.

The initial surface normal estimates n_(i)(x) are determined independently from each other. However, the use of the Poisson equation as described above brings a dependency between neighbouring surface normal estimates. In this way, the ambiguity in the surface normal direction perpendicular to the lighting direction can be at least partially resolved, resulting in refined surface normal estimates n_(r)(x) which better describe physical surfaces. This is achieved by enforcing conservatism in the surface normal field.

For example FIG. 7 shows a representation 704 ₀ of the refined surface normals n_(r)(x) determined for the same object as represented by 702 ₀, which is lit from above. The three representations below 704 ₀ show the x, y and z components of the surface normals n_(r)(x). In particular, the representation 704 _(x) shows the x components of the surface normals n_(r)(x), the representation 704 _(y) shows the y components of the surface normals n_(r)(x), and the representation 704 _(z) shows the components of the surface normals n_(r)(x). It can be seen that the refined surface normal estimates n_(r)(x) contain more detail than the initial surface normal estimates n_(i)(x), particularly in the x and z directions, i.e. perpendicular to the direction of the lighting.

As described above, the refined surface normal estimates n_(r)(x) are provided to the store 228 for storage therein, to be subsequently used for rendering an image of the scene, e.g. from a rendering viewpoint under arbitrary lighting conditions.

The image processing system 200 may be implemented in a computer system such as that shown in FIG. 8, which comprises a GPU 802, a CPU 804, a memory 806 and other devices 808, such as a display 810, speakers 812, a camera 814 and a keypad 816. The components of the computer system can communicate with each other via a communications bus 818. The processing block 202 may be implemented (e.g. in hardware) as part of the GPU 802 as shown in FIG. 8. Alternatively, the processing block may be implemented on the CPU 804. If the functionality of the processing block is implemented in software then the software may be stored as computer program code in the memory 806 and may be executed on a processing unit in the computer system (e.g. on the GPU 802 or the CPU 804), to thereby configure the hardware of the processing unit to perform the functionality of the processing block 202 as described herein. It is noted that the store 228 may be part of the memory 806.

Generally, any of the functions, methods, techniques or components described above can be implemented in modules using software, firmware, hardware (e.g., fixed logic circuitry), or any combination of these implementations. The terms “module,” “functionality,” “component”, “block” and “logic” are used herein to generally represent software, firmware, hardware, or any combination thereof.

In the case of a software implementation, the module, functionality, block, component or logic represents program code that performs specified tasks when executed on a processor (e.g. one or more CPUs). In one example, the methods described may be performed by a computer configured with software of a computer program product in machine readable form stored on a computer-readable medium. One such configuration of a computer-readable medium is signal bearing medium and thus is configured to transmit the instructions (e.g. as a carrier wave) to the computing device, such as via a network. The computer-readable medium may also be configured as a computer-readable storage medium and thus is not a signal bearing medium. Examples of a computer-readable storage medium include a random-access memory (RAM), read-only memory (ROM), an optical disc, flash memory, hard disk memory, and other memory devices that may use magnetic, optical, and other techniques to store instructions or other data and that can be accessed by a machine.

The software may be in the form of a computer program comprising computer program code for configuring a computer to perform the constituent portions of described methods or in the form of a computer program comprising computer program code means adapted to perform all the steps of any of the methods described herein when the program is run on a computer and where the computer program may be embodied on a computer readable medium. The program code can be stored in one or more computer readable media. The features of the techniques described herein are platform-independent, meaning that the techniques may be implemented on a variety of computing platforms having a variety of processors.

Those skilled in the art will also realize that all, or a portion of the functionality, techniques or methods may be carried out by a dedicated circuit, an application-specific integrated circuit, a programmable logic array, a field-programmable gate array, or the like. For example, the module, functionality, component, block or logic (e.g. the logic blocks 204 to 226 in the processing block 202) may comprise hardware in the form of circuitry. Such circuitry may include transistors and/or other hardware elements available in a manufacturing process. Such transistors and/or other elements may be used to form circuitry or structures that implement and/or contain memory, such as registers, flip flops, or latches, logical operators, such as Boolean operations, mathematical operators, such as adders, multipliers, or shifters, and interconnects, by way of example. Such elements may be provided as custom circuits or standard cell libraries, macros, or at other levels of abstraction. Such elements may be interconnected in a specific arrangement. The module, functionality, component or logic may include circuitry that is fixed function and circuitry that can be programmed to perform a function or functions; such programming may be provided from a firmware or software update or control mechanism. In an example, hardware logic has circuitry that implements a fixed function operation, state machine or process.

It is also intended to encompass software which “describes” or defines the configuration of hardware that implements a module, functionality, block, component or logic described above, such as HDL (hardware description language) software, as is used for designing integrated circuits, or for configuring programmable chips, to carry out desired functions. That is, there may be provided a computer readable storage medium having encoded thereon computer readable program code for generating a processing block configured to perform any of the methods described herein, or for generating a processing block comprising any apparatus described herein.

The term ‘processor’ and ‘computer’ are used herein to refer to any device, or portion thereof, with processing capability such that it can execute instructions, or a dedicated circuit capable of carrying out all or a portion of the functionality or methods, or any combination thereof.

Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. It will be understood that the benefits and advantages described above may relate to one example or may relate to several examples.

Any range or value given herein may be extended or altered without losing the effect sought, as will be apparent to the skilled person. The steps of the methods described herein may be carried out in any suitable order, or simultaneously where appropriate. Aspects of any of the examples described above may be combined with aspects of any of the other examples described to form further examples without losing the effect sought. 

1. A method of determining local irradiance estimates for a scene in an image processing system, the method comprising: obtaining initial irradiance estimates for sample positions on one or more surfaces in the scene, the initial irradiance estimates being based on a global irradiance estimate for the scene; obtaining visibility indications which indicate the visibility of the sample positions in the scene in dependence on viewing angle; calculating an angle-dependent radiance estimate for the scene using the obtained initial irradiance estimates and the obtained visibility indications; and determining local irradiance estimates at the sample positions using the radiance estimate and the visibility indications.
 2. The method of claim 1 further comprising using the local irradiance estimates to determine an intrinsic colour estimate for a texture.
 3. The method of claim 1 wherein the global irradiance estimate is dependent upon surface normal, and wherein said obtaining initial irradiance estimates for sample positions on one or more surfaces in the scene comprises determining the initial irradiance estimates by sampling the global irradiance estimate using surface normals of the sample positions.
 4. The method of claim 1 wherein the global irradiance estimate for the scene is determined by: analysing at least one view of the scene to estimate scene geometry describing the one or more surfaces in the scene and to segment an initial texture into a plurality of materials, the initial texture being separable into an intrinsic colour estimate and a corresponding shading estimate; determining an initial coarse intrinsic colour estimate for each of the materials; determining one or more scale factors, for scaling a respective one or more of the initial coarse intrinsic colour estimates, the scale factors being determined based on differences between material irradiance estimates determined for the materials based on shading estimates which correspond with scaled versions of the initial coarse intrinsic colour estimates of the materials; and determining the global irradiance estimate as a function of surface normal using the determined scale factors.
 5. The method of claim 4 wherein, for each of the materials, the initial coarse intrinsic colour estimate is determined by finding the average of the values in the initial texture for the material.
 6. The method of claim 4 wherein said determining the global irradiance estimate using the determined scale factors comprises: scaling the one or more of the initial coarse intrinsic colour estimates using the determined scale factors; and using the scaled coarse intrinsic colour estimates to determine the global irradiance estimate as a function of surface normal.
 7. The method of claim 6 wherein said using the scaled coarse intrinsic colour estimates to determine the global irradiance estimate comprises: combining the scaled coarse intrinsic colour estimates to form a global coarse intrinsic colour estimate; and using the global coarse intrinsic colour estimate to determine the global irradiance estimate as a function of surface normal.
 8. The method of claim 7 further comprising fitting second order spherical harmonics to the global irradiance estimate to thereby denoise the global irradiance estimate.
 9. The method of claim 8 wherein said determining one or more scale factors comprises: determining a measure of the differences between material irradiance estimates for different materials in overlapping regions of the material irradiance estimates, said measure of the differences being dependent upon the scale factors, wherein for a particular scale factor the material irradiance estimate for a material matches the shading estimate which corresponds with a version of the initial coarse intrinsic colour estimate scaled with the particular scale factor; and determining the scale factors so as to minimise the measure of the differences.
 10. The method of claim 1 wherein said obtaining visibility indications comprises determining the visibility indications based on estimated scene geometry describing the one or more surfaces in the scene determined by analysing at least one view of the scene.
 11. The method of claim 1 wherein the visibility indications are in the form of spherical harmonic coefficients, b_(x,k), for sample position x and for the k^(th) order spherical harmonics up to the K^(th) order spherical harmonics.
 12. The method of claim 1 wherein said calculating an angle dependent radiance estimate for the scene comprises determining spherical harmonic coefficients r_(k) for the k^(th) order spherical harmonics up to the K^(th) order spherical harmonics, wherein the radiance estimate is calculated in accordance with the equation: R*=(B ^(T) B)⁻¹ B ^(T) I _(E), where R* is a vector of the spherical harmonic coefficients r_(k) for the radiance estimate, B is a matrix of the spherical harmonic coefficients b_(x,k) for the visibility indications and I_(E) is a vector of the obtained initial irradiance estimates for the sample positions, x.
 13. The method of claim 1 wherein the local irradiance estimate I(x) at sample position x is determined in accordance with the equation: I(x)=Σ_(k=1) ^(K) b _(x,k) r _(k) where b_(x,k) is the k^(th) order spherical harmonic coefficient for the visibility indications at sample position x, and where r_(k) is the k^(th) order spherical harmonic coefficient for the radiance estimate.
 14. The method of claim 11 wherein K is in the range 10≦K≦16.
 15. The method of claim 14 wherein K=14.
 16. An image processing system comprising scene lighting estimation logic configured to determine local irradiance estimates for a scene, wherein the scene lighting estimation logic is configured to: (i) obtain initial irradiance estimates for sample positions on one or more surfaces in the scene, wherein the initial irradiance estimates are based on a global irradiance estimate for the scene, and (ii) obtain visibility indications which indicate the visibility of the sample positions in the scene in dependence on viewing angle, wherein the scene lighting estimation logic comprises: cast shadow processing logic configured to: (i) calculate an angle-dependent radiance estimate for the scene using the obtained initial irradiance estimates and the obtained visibility indications, and (ii) determine local irradiance estimates at the sample positions using the radiance estimate and the visibility indications.
 17. The image processing system of claim 16 wherein the global irradiance estimate is dependent upon surface normal, and wherein the scene lighting estimation logic is configured to obtain the initial irradiance estimates for sample positions on one or more surfaces in the scene by determining the initial irradiance estimates by sampling the global irradiance estimate using surface normals of the sample positions.
 18. The image processing system of claim 16 further comprising: scene analysis logic configured to analyse at least one view of the scene to estimate scene geometry describing the one or more surfaces in the scene, wherein an initial texture is segmented into a plurality of materials, the initial texture being separable into an intrinsic colour estimate and a corresponding shading estimate; wherein the scene lighting estimation logic further comprises attached shadow processing logic configured to: determine an initial coarse intrinsic colour estimate for each of the materials; and determine one or more kale factors, for scaling a respective one or more of the initial coarse intrinsic colour estimates, the scale factors being determined based on differences between material irradiance estimates determined for the materials based on shading estimates which correspond with scaled versions of the initial coarse intrinsic colour estimates of the materials; wherein the scene lighting estimation logic is configured to determine the global irradiance estimate as a function of surface normal using the determined scale factors.
 19. The image processing system of claim 18 wherein the scene lighting estimation logic is configured to determine one or more scale factors by: determining a measure of the differences between material irradiance estimates for different materials in overlapping regions of the material irradiance estimates, said measure of the differences being dependent upon the scale factors, wherein for a particular scale factor the material irradiance estimate for a material matches the shading estimate which corresponds with a version of the initial coarse intrinsic colour estimate scaled with the particular scale factor; and determining the scale factors so as to minimise the measure of the differences.
 20. A non-transitory computer readable storage medium having encoded thereon computer readable code that causes a processor to either: (i) determine local irradiance estimates for a scene in an image processing system, by: obtaining initial irradiance estimates for sample positions on one or more surfaces in the scene, the initial irradiance estimates being based on a global irradiance estimate for the scene; obtaining visibility indications which indicate the visibility of the sample positions in the scene in dependence on viewing angle; calculating an angle-dependent radiance estimate for the scene using the obtained initial irradiance estimates and the obtained visibility indications; and determining local irradiance estimates at the sample positions using the radiance estimate and the visibility indications; or (ii) generate a processing block configured to determine local irradiance estimates for a scene in an image processing system, by: obtaining initial irradiance estimates for sample positions on one or more surfaces in the scene, the initial irradiance estimates being based on a global irradiance estimate for the scene; obtaining visibility indications which indicate the visibility of the sample positions in the scene in dependence on viewing angle; calculating an angle-dependent radiance estimate for the scene using the obtained initial irradiance estimates and the obtained visibility indications; and determining local irradiance estimates at the sample positions using the radiance estimate and the visibility indications. 